using System;
using System.Collections;
using System.Collections.Generic;

namespace BlobNet.Base.Collections
{
    [Serializable]
    public abstract class BlobCollection<TType> : BlobPart, ICollection<TType>,IEnumerable<TType>,IEnumerable
    {
        protected BlobCollection(BlobDomain blobDomain, Guid entityId)
            : base(blobDomain, entityId)
        {
        }


        public abstract IEnumerator<TType> GetEnumerator();
        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        public abstract void Add(TType item);
        public abstract void Clear();
        public abstract bool Contains(TType item);
        public abstract void CopyTo(TType[] array, int arrayIndex);
        public abstract bool Remove(TType item);
        public abstract int Count { get; }
        public abstract bool IsReadOnly { get; }
    }
}